<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   <%@include file="/view/resource.jsp" %>
  </head>
  <body class="easyui-layout">
  	 <!-- Search panel start -->
 	 <div class="ui-search-panel" region="north" style="height: 80px;" title="过滤条件" data-options="striped: false,collapsible:false,iconCls:'icon-search',border:false" >   
 	 <form id="searchForm">
 	 	<input class="hidden" id='search_parentId' name="parentId">
 	 	<p class="ui-fields">
            <label class="ui-label">个人编码:</label> 
            <input name="hsoPercoding" class="easyui-box ui-text" style="width:100px;">
        </p>
        <a id="btn-search" class="easyui-linkbutton" iconCls="icon-search">查询</a>
      </form>  
     </div> 
     <!--  Search panel end -->
     <!-- DataList  -->
	 <div region="center" border="false" >
     	<table id="data-list" ></table>
     </div>
    
     <!-- Edit Win&From -->
     <div id="edit-win" class="easyui-dialog" title="编辑社保" data-options="closed:true,iconCls:'icon-save',modal:true"  style="width:500px;height:450px;">  
     	<form id="editForm" name="editForm" class="ui-form" method="post"> 
     	 <!-- 隐藏文本框 -->
     	 <input class="hidden" name="id">
     	 <input class="hidden" name="deleted">
    	 <input class="hidden" name="parentId" id='edit_parentId'>
    	 <script>
    	 function getcont(){
    	 	tmulti('t3','t1','xs1');
    	 	tmulti('t4','t1','xs2');
    	 	tsum('t5','t3','t4');
    	 	tmulti('t6','t1','xs3');
    	 	tmulti('t7','t1','xs4');
    	 	tmulti('t8','t1','xs5');
    	 	tmulti('t9','t1','xs6');
    	 	tsum('t10','t6','t7','t8','t9');
    	 	tmulti('t11','t1','xs7');
    	 	tmulti('t12','t1','xs8');
    	 	tsum('t13','t11','t12');
    	 	tmulti('t14','t1','xs9');
    	 	tsum('t15','t3','t6','t8','t9','t11','t14');
    	 	tsum('t16','t4','t7','t12');
    	 	tsum('t17','t15','t16');
    	 }
    	 
    	 function setHsoEn2month(){
    	 	tmulti('t3','t1','xs1','hsoEn2month');
    	 	tmulti('t4','t1','xs2','hsoEn2month');
    	 	tsum('t5','t3','t4');
    	 	
    	 	tmulti('t6','t1','xs3','hsoMe2month');
    	 	tmulti('t7','t1','xs4','hsoMe2month');
    	 	tmulti('t8','t1','xs5','hsoMe2month');
    	 	tmulti('t9','t1','xs6','hsoMe2month');
    	 	tsum('t10','t6','t7','t8','t9');
    	 	
    	 	tmulti('t11','t1','xs7','hsoUn2month');
    	 	tmulti('t12','t1','xs8','hsoUn2month');
    	 	tsum('t13','t11','t12');
    	 	
    	 	tmulti('t14','t1','xs9','hsoIn2month');
    	 	
    	 	tsum('t15','t3','t6','t8','t9','t11','t14');
    	 	tsum('t16','t4','t7','t12');
    	 	tsum('t17','t15','t16');
    	 }

    </script>
    	 <div class="ui-edit"> 
    	  <div data-options="region:'north',split:true" style="height:185px;padding:10px">  
	               <div class="ftitle">详细</div>    
		               <label>社保编号:</label>  
		               <input class="easyui-validatebox" type="text" name="hsoPercoding" data-options="required:false">&nbsp;&nbsp;
		               <label>人员姓名:</label>  
		                <input name="hsoName" id="hsoName" type="hidden">
		               <select  id="hrName" class="easyui-combobox"  name="hrId" style="width:150px; border: 1px solid #ccc"></select><br><br>
		               <label>缴费工资:</label>
		               <input class="easyui-validatebox" type="text" name="hsoSalary" data-options="required:true" id="t1" onKeyUp="getcont()">&nbsp;&nbsp;
		               <label>养老保险(单):</label>  
		               <input class="hidden" type="text" id="xs1" value="0.2">
		               <input class="easyui-validatebox" type="text" name="hsoPensionpay" style="width:110px" data-options="required:true" id="t3"><br><br>
		               <label>养老保险(个):</label>  
		               <input class="hidden" type="text" id="xs2" value="0.08">
		               <input class="easyui-validatebox" type="text" name="hsoIndividpay" style="width:115px"  data-options="required:true" id="t4">&nbsp;&nbsp;
		               <label>养老小计:</label>  
		               <input class="easyui-validatebox" type="text" name="hsoPsubtotal" data-options="required:true" style="width:130px" id="t5"><br><br>
		               <label>养老月数:</label>  
		               <input class="easyui-validatebox" type="text" name="hsoEn2month" id="hsoEn2month" data-options="required:true" value="1" onKeyUp="setHsoEn2month()">&nbsp;&nbsp;
		               <label>医疗单位缴纳:</label>  
		               <input class="hidden" type="text" id="xs3" value="0.065">
		               <input class="easyui-validatebox" type="text" name="hsoMedicalpay" style="width:108px" data-options="required:true" id="t6"><br><br>
		               <label>医疗个人缴纳:</label> 
		               <input class="hidden" type="text" id="xs4" value="0.02"> 
		               <input class="easyui-validatebox" type="text" name="hsoMedindividual" style="width:110px" data-options="required:true" id="t7">&nbsp;&nbsp;
		               <label>大病互助医疗:</label>
		                <input class="hidden" type="text" id="xs5" value="0.01">  
		               <input class="easyui-validatebox" type="text" name="hsoMediillnes" style="width:108px" data-options="required:true" id="t8"><br><br>
		               <label>医疗生育:</label>  
		                <input class="hidden" type="text" id="xs6" value="0.006">
		               <input class="easyui-validatebox" type="text" name="hsoMedicalbirth" data-options="required:true" id="t9">&nbsp;&nbsp;
		               <label>医疗小计:</label>  
		               <input class="easyui-validatebox" type="text" name="hsoMedicalsub" style="width:132px" data-options="required:true" id="t10"><br><br>
		               <label>医疗月数:</label>  
		               <input class="easyui-validatebox" type="text" name="hsoMe2month" data-options="required:true" id="hsoMe2month" value="1" onKeyUp="setHsoEn2month()">&nbsp;&nbsp;
		               <label>失业单位缴纳:</label>  
		               <input class="hidden" type="text" id="xs7" value="0.02">
		               <input class="easyui-validatebox" type="text" name="hsoUnitpay" style="width:110px" data-options="required:true" id="t11"><br><br>
		               <label>失业个人缴纳:</label>  
		               <input class="hidden" type="text" id="xs8" value="0.01">
		               <input class="easyui-validatebox" type="text" name="hsoIndpay" style="width:110px" data-options="required:true" id="t12">&nbsp;&nbsp;
		               <label>失业小计:</label>  
		               <input class="easyui-validatebox" type="text" name="hsoUnemploysub" data-options="required:true" id="t13"><br><br>
		               <label>失业月数:</label>  
		               <input class="easyui-validatebox" type="text" name="hsoUn2month" id="hsoUn2month"   data-options="required:true" value="1" onKeyUp="setHsoEn2month()">&nbsp;&nbsp;
		               <label>工伤保险:</label>  
		                <input class="hidden" type="text" id="xs9" value="0.006">
		               <input class="easyui-validatebox" type="text" name="hsoInduinjury" data-options="required:true" id="t14"><br><br>
		               <label>工伤月数:</label>  
		               <input class="easyui-validatebox" type="text" name="hsoIn2month" id="hsoIn2month" data-options="required:true" value="1" onKeyUp="setHsoEn2month()">&nbsp;&nbsp;
		               <label>小计单位缴纳:</label> 
		               <input class="easyui-validatebox" type="text" name="hsoSubtotalpay" style="width:110px" data-options="required:true"  id="t15"><br><br>
		               <label>小计个人缴纳:</label> 
		               <input class="easyui-validatebox" type="text" style="width:110px" name="hsoSubtotal" data-options="required:true" id="t16">&nbsp;&nbsp;
		               <label>合计:</label>  
		               <input class="easyui-validatebox" type="text" name="hsoTotal" data-options="required:true" style="width:158px" id="t17"><br><br>
		               <label>月&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;份:</label> 
		               <input class="easyui-datebox" type="text"  id="dd" name="hsoMonth" data-options="required:true" style="width:100px; border: 1px solid #ccc"> 
	            </div>
			</div>
     	</form>
  	 </div>
  <script type="text/javascript" src="<%=basePath%>/osjs/manpower/TostHrSocialsecurity.js"></script>
  
     <!-- Edit Win&From -->
     <div id="import-win" class="easyui-dialog" title="批量导入社保" data-options="closed:true,iconCls:'icon-tip',modal:true"  style="width:400px;height:250px;">  
     	<form id="importForm" action="upload.do" class="ui-form" method="post" enctype="multipart/form-data" target="ifm" onsubmit="return soalsub(this)"> 
     	 <!-- 隐藏文本框 -->
    	 <div class="ui-edit"> 
    	   <div data-options="region:'north',split:true" style="height:185px;padding:10px"> 
    	   选择生成社保月份：<input class='easyui-datebox' name='hsoMonth' id="dd"/><br/> 
			<input type="file" name="excelPath" value="选择文件"> <input type="submit" value="确认导入" >
		    </div>
     	</form>
     	<iframe id='ifm' name='ifm' style="visibility:hidden;display:none"></iframe>
  	 </div>
  	 
  	  <script type="text/javascript">
  	 function soalsub(tobj){
  	 	var obj = tobj.hsoMonth;
  	 	var objfile = tobj.excelPath;
  	 	if(obj.value==null||obj.value==''){
  	 		alert("请选择您需要导入的月份！");
  	 		return false;
  	 	}
  	 	if(objfile.value==null || objfile.value==''){
  	 		alert("请选择您需要导入的文件！");
  	 		return false;
  	 	}
  	 	return true;
  	 }
  	 </script>
  	 
  </body>
</html>